<?php
// +-------------------------------------------------------------------------------
// | DingZone [ A Rapid Development Framework For Dingtalk ]
// +-------------------------------------------------------------------------------
// | 系统路由定义 v1.0
// |
// | Copyright (c) 2014-2018 http://www.heimalanshi.com All rights reserved.
// | Author : Jie
// | Date : 2018-08-09
// +-------------------------------------------------------------------------------

$routes = [];

//后台路由
if (\C::CORE) {
    $routes = array_merge($routes, [
        "core$" => "core/index/index",
        "core/enterprise/" => "core/enterprise.index/index",
        "core/enterprise/login" => "core/enterprise.user/login",
        "core/enterprise/logout" => "core/enterprise.user/logout",
        "core/enterprise.api/:apiName" => "core/enterprise.api/call",
        "core/site/" => "core/site.index/index",
        "core/site/login" => "core/site.user/login",
        "core/site/logout" => "core/site.user/logout",
        "core/site.module/all/:status" => "core/site.module/all",
        "core/site.module/detail/:moduleName" => "core/site.module/detail",
        "core/site.module/active/:moduleName" => "core/site.module/active",
        "core/site.module/inactive/:moduleName" => "core/site.module/inactive",
        "core/site.module/install/:moduleName" => "core/site.module/install",
        "core/site.module/uninstall/:moduleName" => "core/site.module/uninstall",
    ]);
}

//前台路由
if (C::ADDONS) {
    $routes = array_merge($routes, [
        "/site" => "index/index/site",
        ":moduleName/logo.png" => "index/resource/logo",
        ":moduleName/js/:jsName" => "index/resource/js",
        ":moduleName/css/:cssName" => "index/resource/css",
        ":moduleName/img/:imgName" => "index/resource/img",
        ":moduleName/static/:resourcePath" => "index/resource/index"
    ]);
}

return $routes;
